home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / misc / emu / FrodoV1_3.lha / src / Main.asm < prev    next >
Encoding:
Assembly Source File  |  1995-02-22  |  34.1 KB  |  1,700 lines

  1. *
  2. * Main.asm - Hauptprogramm des C64-Emulators/Einstellungsfenster
  3. *
  4. * Copyright (C) 1994-1995 by Christian Bauer
  5. *
  6.  
  7.         MACHINE    68020
  8.  
  9.         INCLUDE    "exec/types.i"
  10.         INCLUDE    "exec/macros.i"
  11.         INCLUDE    "exec/memory.i"
  12.         INCLUDE    "exec/execbase.i"
  13.         INCLUDE    "dos/dos.i"
  14.         INCLUDE    "intuition/intuition.i"
  15.         INCLUDE    "graphics/displayinfo.i"
  16.         INCLUDE    "libraries/gadtools.i"
  17.         INCLUDE    "libraries/asl.i"
  18.         INCLUDE    "libraries/locale.i"
  19.         INCLUDE    "libraries/cybergraphics.i"
  20.         INCLUDE    "workbench/workbench.i"
  21.         INCLUDE    "FrodoPrefs.i"
  22.         INCLUDE    "Frodo_rev.i"
  23. CATCOMP_NUMBERS    = 1
  24.         INCLUDE    "Strings.i"
  25.  
  26.         XREF    _SysBase    ;Startup
  27.         XREF    _DOSBase
  28.         XDEF    _main
  29.  
  30.         XDEF    _UtilityBase
  31.         XDEF    _IntuitionBase
  32.         XDEF    _GfxBase
  33.         XDEF    _GadToolsBase
  34.         XDEF    _AslBase
  35.         XDEF    _EGSBase
  36.         XDEF    _VilIntuiBase
  37.         XDEF    _CyberGfxBase
  38.         XDEF    _CiaBase
  39.         XDEF    _MiscBase
  40.         XDEF    _SID6581Base
  41.  
  42.         XDEF    ShowPrefs
  43.  
  44.         XREF    PrefsNGads
  45.  
  46.         XDEF    MainTask
  47.  
  48.         XDEF    TheLocale    ;Strings.o
  49.         XREF    GetString
  50.  
  51.         XREF    TheRAM        ;6510.asm
  52.         XREF    TheBasic
  53.         XREF    TheKernal
  54.         XREF    TheChar
  55.         XREF    TheColor
  56.         XREF    Init6510
  57.         XREF    Start6510
  58.         XREF    Stop6510
  59.         XREF    Wait6510
  60.         XREF    Pause6510
  61.         XREF    Resume6510
  62.         XREF    Localize6510
  63.  
  64.         XREF    Reset6526    ;6526.asm
  65.         XREF    ChangedKeys
  66.         XREF    CIACycles
  67.         XREF    Joystick1On
  68.         XREF    Joystick2On
  69.         XREF    JoystickSwap
  70.         XREF    KeyboardYZ
  71.  
  72.         XREF    OpenGraphics    ;6569.asm
  73.         XREF    CloseGraphics
  74.         XREF    WaitForClick
  75.         XREF    AmigaToFront
  76.         XREF    EmulToFront
  77.         XREF    DisplayID
  78.         XREF    ScreenType
  79.         XREF    NormalCycles
  80.         XREF    BadLineCycles
  81.         XREF    Collisions
  82.         XREF    Overscan
  83.         XREF    SkipLatch
  84.  
  85.         XREF    Reset6581    ;6581.asm
  86.         XREF    ChangedSID
  87.         XREF    PauseSound
  88.         XREF    ResumeSound
  89.         XREF    CloseSID
  90.         XREF    UseSIDCard
  91.  
  92.         XREF    Open1541    ;1541.asm
  93.         XREF    Close1541
  94.         XREF    ChangedDirs
  95.         XREF    CloseIEC
  96.         XREF    ChangedIEC
  97.         XREF    Dir8
  98.         XREF    Dir9
  99.         XREF    Dir10
  100.         XREF    Dir11
  101.         XREF    Drv8IsIEC
  102.         XREF    Drv9IsIEC
  103.         XREF    Drv10IsIEC
  104.         XREF    Drv11IsIEC
  105.         XREF    OtherIEC
  106.         XREF    MapSlash
  107.  
  108.         SECTION    "CODE",CODE
  109.  
  110.  
  111. **
  112. ** Definitionen
  113. **
  114.  
  115. ; CyberGfx
  116. CModeRequest    = -66
  117.  
  118.  
  119. **
  120. ** Makros
  121. **
  122.  
  123. ; LongInt-Wert aus Integer-Gadget a0 lesen
  124. GetInt        MACRO    ;Ziel
  125.         move.l    gg_SpecialInfo(a0),a0
  126.         move.l    si_LongInt(a0),\1
  127.         ENDM
  128.  
  129.  
  130. **
  131. ** Hauptprogramm
  132. **
  133.  
  134. ; Task holen
  135. _main        move.l    _SysBase,a6
  136.         sub.l    a1,a1
  137.         JSRLIB    FindTask
  138.         move.l    d0,MainTask
  139.  
  140. ; Libraries öffnen
  141.         moveq    #37,d0
  142.         lea    UtilityName,a1
  143.         JSRLIB    OpenLibrary
  144.         move.l    d0,_UtilityBase
  145.         beq    NoUtility
  146.  
  147.         moveq    #37,d0
  148.         lea    IntuiName,a1
  149.         JSRLIB    OpenLibrary
  150.         move.l    d0,_IntuitionBase
  151.         beq    NoIntui
  152.  
  153.         moveq    #37,d0
  154.         lea    GfxName,a1
  155.         JSRLIB    OpenLibrary
  156.         move.l    d0,_GfxBase
  157.         beq    NoGfx
  158.  
  159.         moveq    #37,d0
  160.         lea    GadToolsName,a1
  161.         JSRLIB    OpenLibrary
  162.         move.l    d0,_GadToolsBase
  163.         beq    NoGadTools
  164.  
  165.         moveq    #38,d0
  166.         lea    AslName,a1
  167.         JSRLIB    OpenLibrary
  168.         move.l    d0,_AslBase
  169.         beq    NoAsl
  170.  
  171.         moveq    #37,d0
  172.         lea    IconName,a1
  173.         JSRLIB    OpenLibrary
  174.         move.l    d0,_IconBase
  175.         beq    NoIcon
  176.  
  177.         moveq    #0,d0
  178.         lea    SID6581Name,a1
  179.         JSRLIB    OpenLibrary
  180.         move.l    d0,_SID6581Base
  181.  
  182.         lea    CiaResName,a1
  183.         JSRLIB    OpenResource
  184.         move.l    d0,_CiaBase
  185.         beq    NoCiaRes
  186.  
  187.         lea    MiscResName,a1
  188.         JSRLIB    OpenResource
  189.         move.l    d0,_MiscBase
  190.         beq    NoMiscRes
  191.  
  192. ; Locale öffnen und Catalog laden
  193.         move.l    _SysBase,a6
  194.         moveq    #37,d0
  195.         lea    LocaleName,a1
  196.         JSRLIB    OpenLibrary
  197.         move.l    d0,_LocaleBase
  198.         beq    1$
  199.         move.l    d0,a6
  200.         sub.l    a0,a0
  201.         lea    CatalogName,a1
  202.         sub.l    a2,a2
  203.         JSRLIB    OpenCatalogA
  204.         move.l    d0,TheCatalog
  205.  
  206. ; Datenstrukturen lokalisieren
  207. 1$        bsr    Localize
  208.         bsr    Localize6510
  209.  
  210. ; 68020 vorhanden?
  211.         move.l    _SysBase,a0
  212.         move.w    AttnFlags(a0),d0
  213.         btst    #AFB_68020,d0
  214.         beq    No68020Exit
  215.  
  216. ; ScreenMode- und Directory-Requester holen
  217.         move.l    _AslBase,a6
  218.         moveq    #ASL_ScreenModeRequest,d0
  219.         lea    ScreenReqTags,a0
  220.         JSRLIB    AllocAslRequest
  221.         move.l    d0,ScreenRequester
  222.         beq    NoMemExit
  223.  
  224.         moveq    #ASL_FileRequest,d0
  225.         lea    DirReqTags,a0
  226.         JSRLIB    AllocAslRequest
  227.         move.l    d0,DirRequester
  228.         beq    NoMemExit
  229.  
  230. ; Vorgegebene Einstellungen
  231.         move.w    #63,PNormalCycles
  232.         move.w    #23,PBadLineCycles
  233.         move.w    #63,PCIACycles
  234.         clr.w    PJoystick1On
  235.         move.w    #-1,PJoystick2On
  236.         clr.w    PJoystickSwap
  237.         clr.l    PDisplayID
  238.         clr.w    PScreenType
  239.         clr.b    PDir8
  240.         clr.b    PDir9
  241.         clr.b    PDir10
  242.         clr.b    PDir11
  243.         clr.w    PUseSIDCard
  244.         clr.w    KeyboardYZ
  245.         move.w    #-1,PCollisions
  246.         move.w    #-1,PMapSlash
  247.         move.w    #-1,PFastReset
  248.         move.w    #OSCAN_TEXT,POverscan
  249.         move.w    #1,PSkipLatch
  250.  
  251. ; Einstellungen laden
  252.         move.l    _DOSBase,a6
  253.         move.l    #PrefsFileName,d1
  254.         move.l    #MODE_OLDFILE,d2
  255.         JSRLIB    Open
  256.         move.l    d0,d7
  257.         beq    NoEmulPrefs
  258.  
  259.         move.l    d7,d1
  260.         move.l    #ThePrefs,d2
  261.         move.l    #PrefsLength,d3
  262.         JSRLIB    Read
  263.  
  264.         move.l    d7,d1
  265.         JSRLIB    Close
  266. NoEmulPrefs
  267.  
  268. ; Einstellungsfenster darstellen
  269.         clr.w    PrefsFromEmul
  270.         bsr    DoThePrefs
  271.  
  272. ; Einstellungen übernehmen, wenn OK geklickt, sonst beenden
  273.         tst.l    d7
  274.         beq    Exit
  275.         bsr    SetPrefs
  276.  
  277. ; Dateikram vorbereiten
  278.         jsr    Open1541
  279.         jsr    ChangedIEC
  280.         bsr    IECErrorReq
  281.  
  282. ; Speicher für alles holen (die unteren Worte müssen mit den C64-Adressen
  283. ; übereinstimmen, außer CharROM)
  284.         move.l    _SysBase,a6
  285.         move.l    #$30000,d0        ;192K
  286.         move.l    #MEMF_ANY|MEMF_CLEAR,d1
  287.         JSRLIB    AllocVec
  288.         move.l    d0,RAMBlock
  289.         beq    NoMemExit
  290.  
  291.         add.l    #$ffff,d0        ;Auf xxxx0000 bringen
  292.         clr.w    d0
  293.         move.l    d0,TheRAM
  294.         add.l    #$11000,d0
  295.         move.l    d0,TheChar        ;yyyy1000
  296.         add.l    #$9000,d0
  297.         move.l    d0,TheBasic        ;yyyya000
  298.         add.l    #$3800,d0
  299.         move.l    d0,TheColor        ;yyyyd800
  300.         add.l    #$0800,d0
  301.         move.l    d0,TheKernal        ;yyyye000
  302.  
  303. ; Opcodes $22 (undefiniert) ab $10000 installieren,
  304. ; für den Fall, daß ein Programm den Wraparound bei $ffff macht
  305.         move.l    TheRAM,a0
  306.         lea    $10000(a0),a0
  307.         moveq    #256/4-1,d0
  308. 1$        move.l    #$22222222,(a0)+
  309.         dbra    d0,1$
  310.  
  311. ; ROMs laden
  312.         move.l    _DOSBase,a6
  313.         move.l    #BasicFileName,d1    ;Basic
  314.         move.l    #MODE_OLDFILE,d2
  315.         JSRLIB    Open
  316.         move.l    d0,d7
  317.         beq    NoBasicExit
  318.         move.l    d0,d1
  319.         move.l    TheBasic,d2
  320.         move.l    #$2000,d3
  321.         JSRLIB    Read
  322.         move.l    d7,d1
  323.         JSRLIB    Close
  324.  
  325.         move.l    #KernalFileName,d1    ;Kernal
  326.         move.l    #MODE_OLDFILE,d2
  327.         JSRLIB    Open
  328.         move.l    d0,d7
  329.         beq    NoKernalExit
  330.         move.l    d0,d1
  331.         move.l    TheKernal,d2
  332.         move.l    #$2000,d3
  333.         JSRLIB    Read
  334.         move.l    d7,d1
  335.         JSRLIB    Close
  336.  
  337.         move.l    #CharFileName,d1    ;Char
  338.         move.l    #MODE_OLDFILE,d2
  339.         JSRLIB    Open
  340.         move.l    d0,d7
  341.         beq    NoCharExit
  342.         move.l    d0,d1
  343.         move.l    TheChar,d2
  344.         move.l    #$1000,d3
  345.         JSRLIB    Read
  346.         move.l    d7,d1
  347.         JSRLIB    Close
  348.  
  349. ; Betriebssystem patchen
  350.         move.l    TheKernal,a0
  351.         move.w    #$f200,$0d40(a0)    ;IECOut
  352.         move.w    #$f201,$0d23(a0)    ;IECOutATN
  353.         move.w    #$f202,$0d36(a0)    ;IECOutSec
  354.         move.w    #$f203,$0e13(a0)    ;IECIn
  355.         move.w    #$f204,$0def(a0)    ;IECSetATN
  356.         move.w    #$f205,$0dbe(a0)    ;IECRelATN
  357.         move.w    #$f206,$0dcc(a0)    ;IECTurnaround
  358.         move.w    #$f207,$0e03(a0)    ;IECRelease
  359.         bsr    PatchReset
  360.  
  361. ; Bildschirm öffnen
  362.         jsr    OpenGraphics
  363.         cmp.l    #1,d0
  364.         beq    NoScreenExit
  365.         cmp.l    #2,d0
  366.         beq    NoMemExit
  367.         cmp.l    #3,d0
  368.         beq    NoEGSExit
  369.         cmp.l    #4,d0
  370.         beq    NoVilIntuiExit
  371.         cmp.l    #5,d0
  372.         beq    NoDisplayIDExit
  373.         cmp.l    #6,d0
  374.         beq    ScrTooSmallExit
  375.         cmp.l    #7,d0
  376.         beq    NoCyberGfxExit
  377.         cmp.l    #8,d0
  378.         beq    NoCyberModeExit
  379.  
  380. ; Alles initialisieren
  381.         jsr    Reset6526
  382.         jsr    Reset6581
  383.         jsr    Init6510
  384.  
  385. ; 6510 starten
  386.         jsr    Start6510
  387.         tst.l    d0
  388.         bne    NoMemExit
  389.  
  390. ; Auf Mausklick warten
  391.         jsr    WaitForClick
  392.  
  393. ; Programm beenden
  394.         bra    Exit
  395.  
  396. *
  397. * Fehlerbehandlung/Beenden
  398. *
  399.  
  400.         MACHINE    68000
  401.  
  402. No68020Exit    moveq    #MSG_NO68020,d0
  403.         lea    TheLocale,a0
  404.         jsr    GetString
  405.         lea    ErrorReq,a1
  406.         move.l    d0,es_TextFormat(a1)
  407.         sub.l    a0,a0
  408.         sub.l    a2,a2
  409.         sub.l    a3,a3
  410.         move.l    _IntuitionBase,a6
  411.         JSRLIB    EasyRequestArgs
  412.         bra    NoCiaRes
  413.  
  414.         MACHINE    68020
  415.  
  416. NoMemExit    moveq    #MSG_NOMEM,d0
  417.         bra    ReqExit
  418.  
  419. NoScreenExit    moveq    #MSG_NOSCREEN,d0
  420.         bra    ReqExit
  421.  
  422. NoEGSExit    moveq    #MSG_NOEGS,d0
  423.         bra    ReqExit
  424.  
  425. NoVilIntuiExit    moveq    #MSG_NOVILINTUI,d0
  426.         bra    ReqExit
  427.  
  428. NoCyberGfxExit    moveq    #MSG_NOCYBERGFX,d0
  429.         bra    ReqExit
  430.  
  431. NoDisplayIDExit    moveq    #MSG_NODISPLAYID,d0
  432.         bra    ReqExit
  433.  
  434. NoCyberModeExit    moveq    #MSG_NOCYBERMODE,d0
  435.         bra    ReqExit
  436.  
  437. ScrTooSmallExit    moveq    #MSG_SCRTOOSMALL,d0
  438.         bra    ReqExit
  439.  
  440. NoKernalExit    moveq    #MSG_NOKERNAL,d0
  441.         bra    ReqExit
  442.  
  443. NoBasicExit    moveq    #MSG_NOBASIC,d0
  444.         bra    ReqExit
  445.  
  446. NoCharExit    moveq    #MSG_NOCHAR,d0
  447.  
  448. ReqExit        lea    TheLocale,a0
  449.         jsr    GetString
  450.         lea    ErrorReq,a1
  451.         move.l    d0,es_TextFormat(a1)
  452.         sub.l    a0,a0
  453.         sub.l    a2,a2
  454.         sub.l    a3,a3
  455.         move.l    _IntuitionBase,a6
  456.         JSRLIB    EasyRequestArgs
  457.  
  458. Exit        jsr    Stop6510
  459.         jsr    Reset6581    ;Stoppt diesen Lärm!
  460.         jsr    CloseSID
  461.         jsr    CloseGraphics
  462.         jsr    CloseIEC
  463.         jsr    Close1541
  464.  
  465.         move.l    _SysBase,a6
  466.  
  467.         move.l    RAMBlock,d0
  468.         beq    1$
  469.         move.l    d0,a1
  470.         JSRLIB    FreeVec
  471.  
  472. 1$        move.l    DirRequester,d0
  473.         beq    2$
  474.         move.l    _AslBase,a6
  475.         move.l    d0,a0
  476.         JSRLIB    FreeAslRequest
  477.  
  478. 2$        move.l    ScreenRequester,d0
  479.         beq    3$
  480.         move.l    _AslBase,a6
  481.         move.l    d0,a0
  482.         JSRLIB    FreeAslRequest
  483.  
  484. 3$
  485.         MACHINE    68000
  486.  
  487. NoMiscRes
  488. NoCiaRes    move.l    _SysBase,a6
  489.         move.l    _SID6581Base,d0
  490.         beq    NoSID6581
  491.         move.l    d0,a1
  492.         JSRLIB    CloseLibrary
  493.  
  494. NoSID6581    move.l    _CyberGfxBase,d0
  495.         beq    NoCyberGfx
  496.         move.l    d0,a1
  497.         JSRLIB    CloseLibrary
  498.  
  499. NoCyberGfx    move.l    _VilIntuiBase,d0
  500.         beq    NoVilIntui
  501.         move.l    d0,a1
  502.         JSRLIB    CloseLibrary
  503.  
  504. NoVilIntui    move.l    _EGSBase,d0
  505.         beq    NoEGS
  506.         move.l    d0,a1
  507.         JSRLIB    CloseLibrary
  508.  
  509. NoEGS        move.l    _LocaleBase,d0        ;Catalog schließen
  510.         beq    NoLocale
  511.         move.l    d0,a6
  512.         move.l    TheCatalog,a0
  513.         JSRLIB    CloseCatalog
  514.         move.l    a6,a1
  515.         move.l    _SysBase,a6
  516.         JSRLIB    CloseLibrary
  517.  
  518. NoLocale    move.l    _IconBase,a1
  519.         JSRLIB    CloseLibrary
  520.  
  521. NoIcon        move.l    _AslBase,a1
  522.         JSRLIB    CloseLibrary
  523.  
  524. NoAsl        move.l    _GadToolsBase,a1
  525.         JSRLIB    CloseLibrary
  526.  
  527. NoGadTools    move.l    _GfxBase,a1
  528.         JSRLIB    CloseLibrary
  529.  
  530. NoGfx        move.l    _IntuitionBase,a1
  531.         JSRLIB    CloseLibrary
  532.  
  533. NoIntui        move.l    _UtilityBase,a1
  534.         JSRLIB    CloseLibrary
  535.  
  536. NoUtility    moveq    #0,d0
  537.         rts
  538.  
  539.         MACHINE    68020
  540.  
  541.  
  542. **
  543. ** Je nach Zustand von FastReset den Speichertest aus dem ROM entfernen
  544. **
  545.  
  546. PatchReset    move.l    TheKernal(pc),a0
  547.         tst.w    FastReset
  548.         bne    1$
  549.         move.w    #$d0e8,$1d84(a0)
  550.         rts
  551. 1$        move.w    #$a000,$1d84(a0)
  552.         rts
  553.  
  554.  
  555. **
  556. ** Preferences
  557. **
  558.  
  559. *
  560. * Preferences aus dem Emulator heraus
  561. *
  562.  
  563. ; C64 anhalten und nach hinten legen
  564. ShowPrefs    jsr    Pause6510
  565.         jsr    PauseSound
  566.         jsr    AmigaToFront
  567.  
  568. ; Aktuelle Preferences holen
  569.         bsr    GetPrefs
  570.  
  571. ; Fenster öffnen und handhaben
  572.         move.w    #-1,PrefsFromEmul
  573.         bsr    DoThePrefs
  574.  
  575. ; Prefs setzen, wenn OK geklickt
  576.         tst.l    d7
  577.         beq    1$
  578.         bsr    SetPrefs
  579.         jsr    ChangedDirs    ;Die stehen hier (und nicht in SetPrefs),
  580.         jsr    ChangedIEC    ; weil beim ersten Aufruf von SetPrefs
  581.         bsr    IECErrorReq    ; noch nicht alles initialisiert ist
  582.         bsr    PatchReset
  583. 1$
  584.  
  585. ; C64 nach vorn holen und wieder starten
  586.         jsr    EmulToFront
  587.         jsr    ResumeSound
  588.         jsr    Resume6510
  589.         rts
  590.  
  591. *
  592. * Handhabung des Preferences-Fensters
  593. *
  594.  
  595. ; Fenster öffnen
  596. DoThePrefs    jsr    SetupScreen
  597.         tst.l    d0
  598.         bne    PrefsError
  599.         jsr    OpenPrefsWindow
  600.         tst.l    d0
  601.         bne    PrefsError
  602.         bsr    SetGadgets
  603.         move.l    PrefsWnd,ScreenReqWindow
  604.         move.l    PrefsWnd,DirReqWindow
  605.  
  606. ; EventLoop
  607. EventLoop    move.l    _SysBase,a6
  608.         move.l    PrefsWnd,a0
  609.         move.l    wd_UserPort(a0),a0
  610.         JSRLIB    WaitPort
  611.  
  612. GetEvent    move.l    _GadToolsBase,a6
  613.         move.l    PrefsWnd,a0
  614.         move.l    wd_UserPort(a0),a0
  615.         JSRLIB    GT_GetIMsg
  616.         tst.l    d0
  617.         beq    EventLoop
  618.  
  619.         move.l    d0,a1
  620.         move.l    im_Class(a1),TheClass
  621.         move.w    im_Code(a1),TheCode
  622.         move.l    im_IAddress(a1),TheGadget
  623.         JSRLIB    GT_ReplyIMsg
  624.  
  625. ; Klasse auswerten
  626.         move.l    TheClass,d0
  627.         and.l    #IDCMP_GADGETUP,d0
  628.         beq    NotGadget
  629.  
  630. ; GadgetUp
  631.         move.l    TheGadget,a0
  632.  
  633. ; OK
  634.         cmp.w    #GD_OK,gg_GadgetID(a0)
  635.         bne    1$
  636.         moveq    #-1,d7
  637.         bra    PrefsDone
  638.  
  639. ; Cancel
  640. 1$        cmp.w    #GD_Cancel,gg_GadgetID(a0)
  641.         bne    2$
  642.         moveq    #0,d7
  643.         bra    PrefsDone
  644.  
  645. ; Save
  646. 2$        cmp.w    #GD_Save,gg_GadgetID(a0)
  647.         bne    4$
  648.         bsr    SaveThePrefs
  649.         bra    GetEvent
  650.  
  651. ; Joystick1On
  652. 4$        cmp.w    #GD_Joystick1On,gg_GadgetID(a0)
  653.         bne    5$
  654.         not.w    PJoystick1On
  655.         bra    GetEvent
  656.  
  657. ; Joystick2On
  658. 5$        cmp.w    #GD_Joystick2On,gg_GadgetID(a0)
  659.         bne    6$
  660.         not.w    PJoystick2On
  661.         bra    GetEvent
  662.  
  663. ; JoystickSwap
  664. 6$        cmp.w    #GD_JoystickSwap,gg_GadgetID(a0)
  665.         bne    7$
  666.         not.w    PJoystickSwap
  667.         bra    GetEvent
  668.  
  669. ; GetDisplayID
  670. 7$        cmp.w    #GD_GetDisplayID,gg_GadgetID(a0)
  671.         bne    8$
  672.         tst.w    PrefsFromEmul        ;Nur beim Start
  673.         bne    GetEvent
  674.  
  675.         cmp.w    #4,PScreenType        ;CyberGfx?
  676.         beq    71$
  677.  
  678.         move.l    _AslBase,a6        ;Nein
  679.         move.l    ScreenRequester,a0
  680.         move.l    PDisplayID,ScreenReqID
  681.         move.w    POverscan,ScreenReqOScan+2
  682.         lea    DoScreenReqTags,a1
  683.         JSRLIB    AslRequest
  684.         tst.l    d0
  685.         beq    GetEvent
  686.  
  687.         move.l    ScreenRequester,a0
  688.         move.l    sm_DisplayID(a0),PDisplayID
  689.         move.w    sm_OverscanType(a0),POverscan
  690.         bsr    SetDisplayIDGad
  691.         bra    GetEvent
  692.  
  693. 71$        tst.l    _CyberGfxBase
  694.         bne    72$
  695.         move.l    _SysBase,a6        ;Ja
  696.         moveq    #40,d0
  697.         lea    CyberGfxName,a1
  698.         JSRLIB    OpenLibrary
  699.         move.l    d0,_CyberGfxBase
  700.         beq    GetEvent
  701.  
  702. 72$        move.l    _CyberGfxBase,a6
  703.         sub.l    a0,a0
  704.         lea    DoCyberReqTags,a1
  705.         move.l    Scr,CyberReqScreen
  706.         jsr    CModeRequest(a6)
  707.         tst.l    d0
  708.         beq    GetEvent
  709.  
  710.         move.l    d0,PDisplayID
  711.         bsr    SetDisplayIDGad
  712.         bra    GetEvent
  713.  
  714. ; ScreenType
  715. 8$        cmp.w    #GD_ScreenType,gg_GadgetID(a0)
  716.         bne    9$
  717.         tst.w    PrefsFromEmul        ;Nur beim Start
  718.         bne    GetEvent
  719.         move.w    TheCode,PScreenType
  720.         bra    GetEvent
  721.  
  722. ; Use SID Card
  723. 9$        cmp.w    #GD_UseSIDCard,gg_GadgetID(a0)
  724.         bne    10$
  725.         not.w    PUseSIDCard
  726.         bra    GetEvent
  727.  
  728. ; Drive 8 is on IEC cable
  729. 10$        cmp.w    #GD_Drv8IsIEC,gg_GadgetID(a0)
  730.         bne    11$
  731.         not.w    PDrv8IsIEC
  732.         beq    101$
  733.         lea    DisableTags,a3
  734.         bra    102$
  735. 101$        lea    EnableTags,a3
  736. 102$        lea    PrefsGadgets,a0
  737.         move.l    GDX_Dir8*4(a0),a0
  738.         move.l    PrefsWnd,a1
  739.         sub.l    a2,a2
  740.         JSRLIB    GT_SetGadgetAttrsA
  741.         bra    GetEvent
  742.  
  743. ; Drive 9 is on IEC cable
  744. 11$        cmp.w    #GD_Drv9IsIEC,gg_GadgetID(a0)
  745.         bne    12$
  746.         not.w    PDrv9IsIEC
  747.         beq    111$
  748.         lea    DisableTags,a3
  749.         bra    112$
  750. 111$        lea    EnableTags,a3
  751. 112$        lea    PrefsGadgets,a0
  752.         move.l    GDX_Dir9*4(a0),a0
  753.         move.l    PrefsWnd,a1
  754.         sub.l    a2,a2
  755.         JSRLIB    GT_SetGadgetAttrsA
  756.         bra    GetEvent
  757.  
  758. ; Drive 10 is on IEC cable
  759. 12$        cmp.w    #GD_Drv10IsIEC,gg_GadgetID(a0)
  760.         bne    13$
  761.         not.w    PDrv10IsIEC
  762.         beq    121$
  763.         lea    DisableTags,a3
  764.         bra    122$
  765. 121$        lea    EnableTags,a3
  766. 122$        lea    PrefsGadgets,a0
  767.         move.l    GDX_Dir10*4(a0),a0
  768.         move.l    PrefsWnd,a1
  769.         sub.l    a2,a2
  770.         JSRLIB    GT_SetGadgetAttrsA
  771.         bra    GetEvent
  772.  
  773. ; Drive 11 is on IEC cable
  774. 13$        cmp.w    #GD_Drv11IsIEC,gg_GadgetID(a0)
  775.         bne    14$
  776.         not.w    PDrv11IsIEC
  777.         beq    131$
  778.         lea    DisableTags,a3
  779.         bra    132$
  780. 131$        lea    EnableTags,a3
  781. 132$        lea    PrefsGadgets,a0
  782.         move.l    GDX_Dir11*4(a0),a0
  783.         move.l    PrefsWnd,a1
  784.         sub.l    a2,a2
  785.         JSRLIB    GT_SetGadgetAttrsA
  786.         bra    GetEvent
  787.  
  788. ; Get Directory for drive 8
  789. 14$        cmp.w    #GD_GetDir8,gg_GadgetID(a0)
  790.         bne    15$
  791.         lea    SetDir8Tags,a3
  792.         lea    PDir8,a4
  793.         move.l    #GD_Dir8,d4
  794.         bsr    DoGetDirName
  795.         bra    GetEvent
  796.  
  797. ; Get Directory for drive 9
  798. 15$        cmp.w    #GD_GetDir9,gg_GadgetID(a0)
  799.         bne    16$
  800.         lea    SetDir9Tags,a3
  801.         lea    PDir9,a4
  802.         move.l    #GD_Dir9,d4
  803.         bsr    DoGetDirName
  804.         bra    GetEvent
  805.  
  806. ; Get Directory for drive 10
  807. 16$        cmp.w    #GD_GetDir10,gg_GadgetID(a0)
  808.         bne    17$
  809.         lea    SetDir10Tags,a3
  810.         lea    PDir10,a4
  811.         move.l    #GD_Dir10,d4
  812.         bsr    DoGetDirName
  813.         bra    GetEvent
  814.  
  815. ; Get Directory for drive 11
  816. 17$        cmp.w    #GD_GetDir11,gg_GadgetID(a0)
  817.         bne    18$
  818.         lea    SetDir11Tags,a3
  819.         lea    PDir11,a4
  820.         move.l    #GD_Dir11,d4
  821.         bsr    DoGetDirName
  822.         bra    GetEvent
  823.  
  824. ; Use IEC cable for device numbers 4-15
  825. 18$        cmp.w    #GD_OtherIEC,gg_GadgetID(a0)
  826.         bne    19$
  827.         not.w    POtherIEC
  828.         bra    GetEvent
  829.  
  830. ; American keyboard layout
  831. 19$        cmp.w    #GD_KeyboardYZ,gg_GadgetID(a0)
  832.         bne    20$
  833.         not.w    PKeyboardYZ
  834.         bra    GetEvent
  835.  
  836. ; Enable sprite collisions
  837. 20$        cmp.w    #GD_Collisions,gg_GadgetID(a0)
  838.         bne    21$
  839.         not.w    PCollisions
  840.         bra    GetEvent
  841.  
  842. ; Map '/' character in file names to '\'
  843. 21$        cmp.w    #GD_MapSlash,gg_GadgetID(a0)
  844.         bne    22$
  845.         not.w    PMapSlash
  846.         bra    GetEvent
  847.  
  848. ; Skip memory test on reset
  849. 22$        cmp.w    #GD_FastReset,gg_GadgetID(a0)
  850.         bne    23$
  851.         not.w    PFastReset
  852.         bra    GetEvent
  853.  
  854. 23$        bra    GetEvent
  855.  
  856. ; Refresh
  857. NotGadget    move.l    TheClass,d0
  858.         and.l    #IDCMP_REFRESHWINDOW,d0
  859.         beq    NotRefresh
  860.         move.l    PrefsWnd,a0
  861.         JSRLIB    GT_BeginRefresh
  862.         move.l    PrefsWnd,a0
  863.         moveq    #-1,d0
  864.         JSRLIB    GT_EndRefresh
  865.         bra    GetEvent
  866.  
  867. ; Tastatur
  868. NotRefresh    move.l    TheClass,d0
  869.         and.l    #IDCMP_VANILLAKEY,d0
  870.         beq    GetEvent
  871.  
  872.         cmp.w    #'o',TheCode        ;O - OK
  873.         bne    1$
  874.         moveq    #-1,d7
  875.         bra    PrefsDone
  876.  
  877. 1$        cmp.w    #'s',TheCode        ;S - Save
  878.         bne    2$
  879.         bsr    SaveThePrefs
  880.         bra    GetEvent
  881.  
  882. 2$        cmp.w    #'c',TheCode        ;C - Cancel
  883.         bne    3$
  884.         moveq    #0,d7
  885.         bra    PrefsDone
  886.  
  887. 3$        bra    GetEvent
  888.  
  889. ; Fertig mit den Prefs
  890. PrefsDone    bsr    GetGadgets
  891.         jsr    ClosePrefsWindow
  892. PrefsError    jsr    CloseDownScreen
  893.         rts
  894.  
  895. *
  896. * Auswahl eines Verzeichnisses
  897. * a3: Zeiger auf Tags zum Ändern des zugehörigen Stringgadgets
  898. * a4: Zeiger auf Puffer für Namen (256 Bytes)
  899. * d4: ID des Stringgadgets, das anschließend geändert werden soll
  900. *
  901.  
  902. DoGetDirName    move.l    a4,a0            ;Verzeichnisname kopieren
  903.         lea    DirName,a1
  904.         moveq    #256/4-1,d0
  905. 1$        move.l    (a0)+,(a1)+
  906.         dbra    d0,1$
  907.  
  908.         move.l    _AslBase,a6        ;Requester darstellen
  909.         move.l    DirRequester,a0
  910.         lea    DoDirReqTags,a1
  911.         JSRLIB    AslRequest
  912.         tst.l    d0
  913.         beq    3$
  914.  
  915.         move.l    DirRequester,a0        ;OK geklickt, Name zurückkopieren
  916.         move.l    fr_Drawer(a0),a0
  917.         move.l    a4,a1
  918.         moveq    #256/4-1,d0
  919. 2$        move.l    (a0)+,(a1)+
  920.         dbra    d0,2$
  921.  
  922.         move.l    _GadToolsBase,a6    ;Name-Gadget neu setzen
  923.         lea    PrefsGadgets,a0
  924.         move.l    (a0,d4.w*4),a0
  925.         move.l    PrefsWnd,a1
  926.         sub.l    a2,a2            ;a3 enthält bereits den Zeiger auf die Tags
  927.         JSRLIB    GT_SetGadgetAttrsA
  928.  
  929. 3$        rts
  930.  
  931. *
  932. * Gadgets setzen
  933. *
  934.  
  935. SetCheckGad    MACRO    ;Name
  936.         tst.w    P\1
  937.         beq    \@1$
  938.         move.l    GDX_\1*4(a5),a0
  939.         move.l    PrefsWnd,a1
  940.         sub.l    a2,a2
  941.         lea    SetCheckTags,a3
  942.         JSRLIB    GT_SetGadgetAttrsA
  943. \@1$
  944.         ENDM
  945.  
  946. SetGadgets    move.l    _GadToolsBase,a6
  947.         lea    PrefsGadgets,a5
  948.  
  949.         move.l    GDX_NormalCycles*4(a5),a0
  950.         move.l    PrefsWnd,a1
  951.         sub.l    a2,a2
  952.         lea    SetIntegerTags,a3
  953.         moveq    #0,d0
  954.         move.w    PNormalCycles,d0
  955.         move.l    d0,SetIntTagsVal
  956.         JSRLIB    GT_SetGadgetAttrsA
  957.  
  958.         move.l    GDX_BadLineCycles*4(a5),a0
  959.         move.l    PrefsWnd,a1
  960.         sub.l    a2,a2
  961.         lea    SetIntegerTags,a3
  962.         moveq    #0,d0
  963.         move.w    PBadLineCycles,d0
  964.         move.l    d0,SetIntTagsVal
  965.         JSRLIB    GT_SetGadgetAttrsA
  966.  
  967.         move.l    GDX_CIACycles*4(a5),a0
  968.         move.l    PrefsWnd,a1
  969.         sub.l    a2,a2
  970.         lea    SetIntegerTags,a3
  971.         moveq    #0,d0
  972.         move.w    PCIACycles,d0
  973.         move.l    d0,SetIntTagsVal
  974.         JSRLIB    GT_SetGadgetAttrsA
  975.  
  976.         move.l    GDX_SkipLatch*4(a5),a0
  977.         move.l    PrefsWnd,a1
  978.         sub.l    a2,a2
  979.         lea    SetIntegerTags,a3
  980.         moveq    #0,d0
  981.         move.w    PSkipLatch,d0
  982.         move.l    d0,SetIntTagsVal
  983.         JSRLIB    GT_SetGadgetAttrsA
  984.  
  985.         SetCheckGad    Joystick1On
  986.         SetCheckGad    Joystick2On
  987.         SetCheckGad    JoystickSwap
  988.         SetCheckGad    UseSIDCard
  989.         SetCheckGad    KeyboardYZ
  990.         SetCheckGad    Collisions
  991.         SetCheckGad    FastReset
  992.         SetCheckGad    Drv8IsIEC
  993.         SetCheckGad    Drv9IsIEC
  994.         SetCheckGad    Drv10IsIEC
  995.         SetCheckGad    Drv11IsIEC
  996.         SetCheckGad    OtherIEC
  997.         SetCheckGad    MapSlash
  998.  
  999.         tst.w    PDrv8IsIEC
  1000.         beq    6$
  1001.         move.l    GDX_Dir8*4(a5),a0
  1002.         move.l    PrefsWnd,a1
  1003.         sub.l    a2,a2
  1004.         lea    DisableTags,a3
  1005.         JSRLIB    GT_SetGadgetAttrsA
  1006.  
  1007. 6$        tst.w    PDrv9IsIEC
  1008.         beq    7$
  1009.         move.l    GDX_Dir9*4(a5),a0
  1010.         move.l    PrefsWnd,a1
  1011.         sub.l    a2,a2
  1012.         lea    DisableTags,a3
  1013.         JSRLIB    GT_SetGadgetAttrsA
  1014.  
  1015. 7$        tst.w    PDrv10IsIEC
  1016.         beq    8$
  1017.         move.l    GDX_Dir10*4(a5),a0
  1018.         move.l    PrefsWnd,a1
  1019.         sub.l    a2,a2
  1020.         lea    DisableTags,a3
  1021.         JSRLIB    GT_SetGadgetAttrsA
  1022.  
  1023. 8$        tst.w    PDrv11IsIEC
  1024.         beq    9$
  1025.         move.l    GDX_Dir11*4(a5),a0
  1026.         move.l    PrefsWnd,a1
  1027.         sub.l    a2,a2
  1028.         lea    DisableTags,a3
  1029.         JSRLIB    GT_SetGadgetAttrsA
  1030.  
  1031. 9$        move.l    GDX_ScreenType*4(a5),a0
  1032.         move.l    PrefsWnd,a1
  1033.         sub.l    a2,a2
  1034.         lea    SetCycleTags,a3
  1035.         moveq    #0,d0
  1036.         move.w    PScreenType,d0
  1037.         move.l    d0,SetCycTagsVal
  1038.         JSRLIB    GT_SetGadgetAttrsA
  1039.  
  1040.         move.l    GDX_Dir8*4(a5),a0
  1041.         move.l    PrefsWnd,a1
  1042.         sub.l    a2,a2
  1043.         lea    SetDir8Tags,a3
  1044.         JSRLIB    GT_SetGadgetAttrsA
  1045.  
  1046.         move.l    GDX_Dir9*4(a5),a0
  1047.         move.l    PrefsWnd,a1
  1048.         sub.l    a2,a2
  1049.         lea    SetDir9Tags,a3
  1050.         JSRLIB    GT_SetGadgetAttrsA
  1051.  
  1052.         move.l    GDX_Dir10*4(a5),a0
  1053.         move.l    PrefsWnd,a1
  1054.         sub.l    a2,a2
  1055.         lea    SetDir10Tags,a3
  1056.         JSRLIB    GT_SetGadgetAttrsA
  1057.  
  1058.         move.l    GDX_Dir11*4(a5),a0
  1059.         move.l    PrefsWnd,a1
  1060.         sub.l    a2,a2
  1061.         lea    SetDir11Tags,a3
  1062.         JSRLIB    GT_SetGadgetAttrsA
  1063.  
  1064.         tst.w    PrefsFromEmul        ;Vom Emulator aufgerufen:
  1065.         beq    1$            ; Bildschirmtyp und -modus
  1066.         move.l    GDX_GetDisplayID*4(a5),a0 ; ausschalten
  1067.         move.l    PrefsWnd,a1
  1068.         sub.l    a2,a2
  1069.         lea    DisableTags,a3
  1070.         JSRLIB    GT_SetGadgetAttrsA
  1071.  
  1072.         move.l    GDX_ScreenType*4(a5),a0
  1073.         move.l    PrefsWnd,a1
  1074.         sub.l    a2,a2
  1075.         lea    DisableTags,a3
  1076.         JSRLIB    GT_SetGadgetAttrsA
  1077.  
  1078. 1$        bra    SetDisplayIDGad
  1079.  
  1080. *
  1081. * DisplayID-Gadget setzen
  1082. *
  1083.  
  1084. SetDisplayIDGad move.l    _GfxBase,a6        ;DisplayID
  1085.         sub.l    a0,a0
  1086.         lea    ModeNameBuf,a1
  1087.         moveq    #nif_SIZEOF,d0
  1088.         move.l    #DTAG_NAME,d1
  1089.         move.l    PDisplayID,d2
  1090.         JSRLIB    GetDisplayInfoData
  1091.         move.l    _GadToolsBase,a6
  1092.         lea    PrefsGadgets,a0
  1093.         move.l    GDX_DisplayID*4(a0),a0
  1094.         move.l    PrefsWnd,a1
  1095.         sub.l    a2,a2
  1096.         lea    SetDIDTags,a3
  1097.         JMPLIB    GT_SetGadgetAttrsA
  1098.  
  1099. *
  1100. * Gadgets holen
  1101. *
  1102.  
  1103. GetGadgets    lea    PrefsGadgets,a1
  1104.         move.l    GDX_NormalCycles*4(a1),a0
  1105.         GetInt    d0
  1106.         move.w    d0,PNormalCycles
  1107.  
  1108.         move.l    GDX_BadLineCycles*4(a1),a0
  1109.         GetInt    d0
  1110.         move.w    d0,PBadLineCycles
  1111.  
  1112.         move.l    GDX_CIACycles*4(a1),a0
  1113.         GetInt    d0
  1114.         move.w    d0,PCIACycles
  1115.  
  1116.         move.l    GDX_SkipLatch*4(a1),a0
  1117.         GetInt    d0
  1118.         move.w    d0,PSkipLatch
  1119.  
  1120.         move.l    GDX_Dir8*4(a1),a0
  1121.         move.l    gg_SpecialInfo(a0),a0
  1122.         move.l    si_Buffer(a0),a0
  1123.         lea    PDir8,a2
  1124.         moveq    #256/4-1,d0
  1125. 11$        move.l    (a0)+,(a2)+
  1126.         dbra    d0,11$
  1127.  
  1128.         move.l    GDX_Dir9*4(a1),a0
  1129.         move.l    gg_SpecialInfo(a0),a0
  1130.         move.l    si_Buffer(a0),a0
  1131.         lea    PDir9,a2
  1132.         moveq    #256/4-1,d0
  1133. 12$        move.l    (a0)+,(a2)+
  1134.         dbra    d0,12$
  1135.  
  1136.         move.l    GDX_Dir10*4(a1),a0
  1137.         move.l    gg_SpecialInfo(a0),a0
  1138.         move.l    si_Buffer(a0),a0
  1139.         lea    PDir10,a2
  1140.         moveq    #256/4-1,d0
  1141. 13$        move.l    (a0)+,(a2)+
  1142.         dbra    d0,13$
  1143.  
  1144.         move.l    GDX_Dir11*4(a1),a0
  1145.         move.l    gg_SpecialInfo(a0),a0
  1146.         move.l    si_Buffer(a0),a0
  1147.         lea    PDir11,a2
  1148.         moveq    #256/4-1,d0
  1149. 14$        move.l    (a0)+,(a2)+
  1150.         dbra    d0,14$
  1151.         rts
  1152.  
  1153. *
  1154. * Einstellungen setzen
  1155. *
  1156.  
  1157. SetPrefs    move.w    PNormalCycles,NormalCycles
  1158.         move.w    PBadLineCycles,BadLineCycles
  1159.         move.w    PCIACycles,CIACycles
  1160.         move.w    PJoystick1On,Joystick1On
  1161.         move.w    PJoystick2On,Joystick2On
  1162.         move.w    PJoystickSwap,JoystickSwap
  1163.         move.w    PDrv8IsIEC,Drv8IsIEC
  1164.         move.w    PDrv9IsIEC,Drv9IsIEC
  1165.         move.w    PDrv10IsIEC,Drv10IsIEC
  1166.         move.w    PDrv11IsIEC,Drv11IsIEC
  1167.         move.w    POtherIEC,OtherIEC
  1168.         move.w    PCollisions,Collisions
  1169.         move.w    POverscan,Overscan
  1170.         move.w    PMapSlash,MapSlash
  1171.         move.w    PFastReset,FastReset
  1172.  
  1173.         move.w    PSkipLatch,SkipLatch
  1174.         bne    2$
  1175.         move.w    #1,SkipLatch        ;Keine Null zulassen
  1176. 2$
  1177.         tst.w    PrefsFromEmul
  1178.         bne    1$
  1179.         move.l    PDisplayID,DisplayID    ;Nur beim Start
  1180.         move.w    PScreenType,ScreenType
  1181. 1$
  1182.         lea    PDir8,a0
  1183.         lea    Dir8,a1
  1184.         moveq    #256/4-1,d0
  1185. 11$        move.l    (a0)+,(a1)+
  1186.         dbra    d0,11$
  1187.  
  1188.         lea    PDir9,a0
  1189.         lea    Dir9,a1
  1190.         moveq    #256/4-1,d0
  1191. 12$        move.l    (a0)+,(a1)+
  1192.         dbra    d0,12$
  1193.  
  1194.         lea    PDir10,a0
  1195.         lea    Dir10,a1
  1196.         moveq    #256/4-1,d0
  1197. 13$        move.l    (a0)+,(a1)+
  1198.         dbra    d0,13$
  1199.  
  1200.         lea    PDir11,a0
  1201.         lea    Dir11,a1
  1202.         moveq    #256/4-1,d0
  1203. 14$        move.l    (a0)+,(a1)+
  1204.         dbra    d0,14$
  1205.  
  1206.         move.w    PUseSIDCard,UseSIDCard
  1207.         jsr    ChangedSID
  1208.  
  1209.         move.w    PKeyboardYZ,KeyboardYZ
  1210.         jmp    ChangedKeys
  1211.  
  1212. *
  1213. * Einstellungen holen
  1214. *
  1215.  
  1216. GetPrefs    move.w    NormalCycles,PNormalCycles
  1217.         move.w    BadLineCycles,PBadLineCycles
  1218.         move.w    CIACycles,PCIACycles
  1219.         move.w    Joystick1On,PJoystick1On
  1220.         move.w    Joystick2On,PJoystick2On
  1221.         move.w    JoystickSwap,PJoystickSwap
  1222.         move.w    UseSIDCard,PUseSIDCard
  1223.         move.w    Drv8IsIEC,PDrv8IsIEC
  1224.         move.w    Drv9IsIEC,PDrv9IsIEC
  1225.         move.w    Drv10IsIEC,PDrv10IsIEC
  1226.         move.w    Drv11IsIEC,PDrv11IsIEC
  1227.         move.w    OtherIEC,POtherIEC
  1228.         move.w    KeyboardYZ,PKeyboardYZ
  1229.         move.w    Collisions,PCollisions
  1230.         move.w    Overscan,POverscan
  1231.         move.w    MapSlash,PMapSlash
  1232.         move.w    FastReset,PFastReset
  1233.         move.l    DisplayID,PDisplayID
  1234.         move.w    ScreenType,PScreenType
  1235.         move.w    SkipLatch,PSkipLatch
  1236.  
  1237.         lea    Dir8,a0
  1238.         lea    PDir8,a1
  1239.         moveq    #256/4-1,d0
  1240. 11$        move.l    (a0)+,(a1)+
  1241.         dbra    d0,11$
  1242.  
  1243.         lea    Dir9,a0
  1244.         lea    PDir9,a1
  1245.         moveq    #256/4-1,d0
  1246. 12$        move.l    (a0)+,(a1)+
  1247.         dbra    d0,12$
  1248.  
  1249.         lea    Dir10,a0
  1250.         lea    PDir10,a1
  1251.         moveq    #256/4-1,d0
  1252. 13$        move.l    (a0)+,(a1)+
  1253.         dbra    d0,13$
  1254.  
  1255.         lea    Dir11,a0
  1256.         lea    PDir11,a1
  1257.         moveq    #256/4-1,d0
  1258. 14$        move.l    (a0)+,(a1)+
  1259.         dbra    d0,14$
  1260.         rts
  1261.  
  1262. *
  1263. * Einstellungen speichern
  1264. *
  1265.  
  1266. SaveThePrefs    bsr    GetGadgets
  1267.  
  1268.         move.l    _DOSBase,a6        ;Datei öffnen
  1269.         move.l    #PrefsFileName,d1
  1270.         move.l    #MODE_NEWFILE,d2
  1271.         JSRLIB    Open
  1272.         move.l    d0,d6
  1273.         beq    2$
  1274.  
  1275.         move.l    d6,d1            ;Einstellungen schreiben
  1276.         move.l    #ThePrefs,d2
  1277.         move.l    #PrefsLength,d3
  1278.         JSRLIB    Write
  1279.  
  1280.         move.l    d6,d1            ;Datei schließene
  1281.         JSRLIB    Close
  1282.  
  1283.         move.l    _IconBase,a6        ;Icon bereits vorhanden?
  1284.         lea    PrefsFileName,a0
  1285.         JSRLIB    GetDiskObject
  1286.         tst.l    d0
  1287.         beq    1$
  1288.         move.l    d0,a0            ;Ja, dann nichts machen
  1289.         JSRLIB    FreeDiskObject
  1290.         rts
  1291.  
  1292. 1$        lea    PrefsFileName,a0    ;Nein, Icon erzeugen
  1293.         lea    PrefsIcon,a1
  1294.         JSRLIB    PutDiskObject
  1295. 2$        rts
  1296.  
  1297. *
  1298. * Requester entsprechend dem Rückgabewert von ChangedIEC anzeigen
  1299. * d0: Rückgabewert
  1300. *
  1301.  
  1302. IECErrorReq    tst.l    d0
  1303.         beq    1$
  1304.         cmp.l    #1,d0
  1305.         bne    2$
  1306.         lea    NoParPortReq,a1
  1307.         bra    3$
  1308. 2$        lea    NoTimerReq,a1
  1309. 3$        move.l    a6,-(sp)
  1310.         move.l    _IntuitionBase,a6
  1311.         sub.l    a0,a0
  1312.         move.l    a0,a2
  1313.         move.l    a0,a3
  1314.         JSRLIB    EasyRequestArgs
  1315.         move.l    (sp)+,a6
  1316. 1$        rts
  1317.  
  1318.  
  1319. *
  1320. * Strings in Datenstrukturen lokalisieren
  1321. *
  1322.  
  1323. GetStr        MACRO    ;Label
  1324.         lea    TheLocale,a0
  1325.         move.l    #\1,d0
  1326.         jsr    GetString
  1327.         ENDM
  1328.  
  1329. Localize    move.l    _UtilityBase,a6
  1330.  
  1331.         GetStr    MSG_REQTITLE
  1332.         move.l    d0,ErrorReq+es_Title
  1333.         move.l    d0,NoParPortReq+es_Title
  1334.         move.l    d0,NoTimerReq+es_Title
  1335.  
  1336.         GetStr    MSG_SCREENTITLE
  1337.         move.l    d0,d2
  1338.         lea    PrefsWindowTags,a0
  1339.         move.l    #WA_ScreenTitle,d0
  1340.         JSRLIB    FindTagItem
  1341.         move.l    d0,a0
  1342.         move.l    d2,4(a0)
  1343.  
  1344.         GetStr    MSG_PREFSTITLE
  1345.         move.l    d0,d2
  1346.         lea    PrefsWindowTags,a0
  1347.         move.l    #WA_Title,d0
  1348.         JSRLIB    FindTagItem
  1349.         move.l    d0,a0
  1350.         move.l    d2,4(a0)
  1351.  
  1352.         GetStr    MSG_REQGADS
  1353.         move.l    d0,ErrorReq+es_GadgetFormat
  1354.  
  1355.         GetStr    MSG_REQGADS2
  1356.         move.l    d0,NoParPortReq+es_GadgetFormat
  1357.         move.l    d0,NoTimerReq+es_GadgetFormat
  1358.  
  1359.         GetStr    MSG_NOPARPORT
  1360.         move.l    d0,NoParPortReq+es_TextFormat
  1361.  
  1362.         GetStr    MSG_NOTIMER
  1363.         move.l    d0,NoTimerReq+es_TextFormat
  1364.  
  1365.         GetStr    MSG_SCREENHAIL
  1366.         move.l    d0,ScreenHailText
  1367.         move.l    d0,CyberHailText
  1368.  
  1369.         GetStr    MSG_DIRHAIL
  1370.         move.l    d0,DirHailText
  1371.  
  1372.         lea    GadTransTable,a2
  1373.         lea    PrefsNGads,a3
  1374. 1$        lea    TheLocale,a0
  1375.         move.l    (a2)+,d0
  1376.         beq    2$
  1377.         jsr    GetString
  1378.         move.l    (a2)+,d1
  1379.         mulu.l    #gng_SIZEOF,d1
  1380.         move.l    d0,gng_GadgetText(a3,d1.w)
  1381.         bra    1$
  1382. 2$        rts
  1383.  
  1384. GadTransTable    dc.l    MSG_OK_GAD,GDX_OK
  1385.         dc.l    MSG_SAVE_GAD,GDX_Save
  1386.         dc.l    MSG_CANCEL_GAD,GDX_Cancel
  1387.         dc.l    MSG_JOYSTICK1ON_GAD,GDX_Joystick1On
  1388.         dc.l    MSG_JOYSTICK2ON_GAD,GDX_Joystick2On
  1389.         dc.l    MSG_JOYSTICKSWAP_GAD,GDX_JoystickSwap
  1390.         dc.l    MSG_GETDISPLAYID_GAD,GDX_GetDisplayID
  1391.         dc.l    MSG_DISPLAYID_GAD,GDX_DisplayID
  1392.         dc.l    MSG_SCREENTYPE_GAD,GDX_ScreenType
  1393.         dc.l    MSG_NORMALCYCLES_GAD,GDX_NormalCycles
  1394.         dc.l    MSG_BADLINECYCLES_GAD,GDX_BadLineCycles
  1395.         dc.l    MSG_CIACYCLES_GAD,GDX_CIACycles
  1396.         dc.l    MSG_DIR8_GAD,GDX_Dir8
  1397.         dc.l    MSG_DIR9_GAD,GDX_Dir9
  1398.         dc.l    MSG_DIR10_GAD,GDX_Dir10
  1399.         dc.l    MSG_DIR11_GAD,GDX_Dir11
  1400.         dc.l    MSG_USESIDCARD_GAD,GDX_UseSIDCard
  1401.         dc.l    MSG_OTHERIEC_GAD,GDX_OtherIEC
  1402.         dc.l    MSG_KEYBOARDYZ_GAD,GDX_KeyboardYZ
  1403.         dc.l    MSG_COLLISIONS_GAD,GDX_Collisions
  1404.         dc.l    MSG_MAPSLASH_GAD,GDX_MapSlash
  1405.         dc.l    MSG_FASTRESET_GAD,GDX_FastReset
  1406.         dc.l    MSG_SKIPLATCH_GAD,GDX_SkipLatch
  1407.         dc.l    0,0
  1408.  
  1409.  
  1410. **
  1411. ** Konstanten
  1412. **
  1413.  
  1414. ; Strings
  1415. Version        VERSTAG
  1416. UtilityName    dc.b    "utility.library",0
  1417. IntuiName    dc.b    "intuition.library",0
  1418. GfxName        dc.b    "graphics.library",0
  1419. GadToolsName    dc.b    "gadtools.library",0
  1420. AslName        dc.b    "asl.library",0
  1421. IconName    dc.b    "icon.library",0
  1422. LocaleName    dc.b    "locale.library",0
  1423. SID6581Name    dc.b    "6581sid.library",0
  1424. CyberGfxName    dc.b    "cybergraphics.library",0
  1425. CiaResName    dc.b    "ciaa.resource",0
  1426. MiscResName    dc.b    "misc.resource",0
  1427.  
  1428. CatalogName    dc.b    "Frodo.catalog",0
  1429. PrefsFileName    dc.b    "PROGDIR:Frodo Prefs",0
  1430. BasicFileName    dc.b    "PROGDIR:Basic ROM",0
  1431. KernalFileName    dc.b    "PROGDIR:Kernal ROM",0
  1432. CharFileName    dc.b    "PROGDIR:Char ROM",0
  1433.         CNOP    0,4
  1434.  
  1435.  
  1436. **
  1437. ** Datenbereich
  1438. **
  1439.  
  1440. _UtilityBase    dc.l    0
  1441. _IntuitionBase    dc.l    0
  1442. _GfxBase    dc.l    0
  1443. _GadToolsBase    dc.l    0
  1444. _AslBase    dc.l    0
  1445. _IconBase    dc.l    0
  1446. _EGSBase    dc.l    0
  1447. _VilIntuiBase    dc.l    0
  1448. _CyberGfxBase    dc.l    0
  1449. _SID6581Base    dc.l    0
  1450. _CiaBase    dc.l    0
  1451. _MiscBase    dc.l    0
  1452.  
  1453. TheLocale            ;Struktur für GetString
  1454. _LocaleBase    dc.l    0
  1455. TheCatalog    dc.l    0
  1456.  
  1457. MainTask    dc.l    0    ;Emulator-Haupttask
  1458.  
  1459. ScreenRequester    dc.l    0    ;ScreenMode-Requester
  1460. DirRequester    dc.l    0    ;Directory-Requester
  1461.  
  1462. RAMBlock    dc.l    0    ;Zeiger auf Speicherbereich
  1463.  
  1464. TheClass    dc.l    0    ;Für Preferences
  1465. TheGadget    dc.l    0
  1466. TheCode        dc.w    0
  1467.  
  1468. PrefsFromEmul    dc.w    0    ;#0: Einstellungen vom Emulator aus aufgerufen
  1469.  
  1470. ; Prefs-Icon
  1471. PrefsIcon    dc.w    WB_DISKMAGIC,WB_DISKVERSION
  1472.         dc.l    0
  1473.         dc.w    0,0,54,23
  1474.         dc.w    4,1,1
  1475.         dc.l    PrefsI1,0,0,0,0
  1476.         dc.w    0
  1477.         dc.l    1
  1478.         dc.b    WBPROJECT,0
  1479.         dc.l    0,0
  1480.         dc.l    NO_ICON_POSITION,NO_ICON_POSITION
  1481.         dc.l    0,0,0
  1482.  
  1483. ; Image für Prefs-Icon
  1484. PrefsI1        dc.w    0,0,54,22,8
  1485.         dc.l    PrefsI1Data
  1486.         dc.b    255,0
  1487.         dc.l    0
  1488.  
  1489. ; Requester
  1490. ErrorReq    dc.l    20,0,0,0,0
  1491. NoParPortReq    dc.l    20,0,0,0,0
  1492. NoTimerReq    dc.l    20,0,0,0,0
  1493.  
  1494. ; Tags zum Setzen von Gadgets
  1495. SetDir8Tags    dc.l    GTST_String,PDir8
  1496.         dc.l    0,0
  1497. SetDir9Tags    dc.l    GTST_String,PDir9
  1498.         dc.l    0,0
  1499. SetDir10Tags    dc.l    GTST_String,PDir10
  1500.         dc.l    0,0
  1501. SetDir11Tags    dc.l    GTST_String,PDir11
  1502.         dc.l    0,0
  1503. SetIntegerTags    dc.l    GTIN_Number
  1504. SetIntTagsVal    dc.l    0
  1505.         dc.l    0,0
  1506. SetCheckTags    dc.l    GTCB_Checked,-1
  1507.         dc.l    0,0
  1508. SetCycleTags    dc.l    GTCY_Active
  1509. SetCycTagsVal    dc.l    0
  1510.         dc.l    0,0
  1511. SetDIDTags    dc.l    GTTX_Text,ModeNameBuf+16
  1512.         dc.l    0,0
  1513. DisableTags    dc.l    GA_Disabled,-1
  1514.         dc.l    0,0
  1515. EnableTags    dc.l    GA_Disabled,0
  1516.         dc.l    0,0
  1517.  
  1518. ; Tags für ScreenMode-Requester
  1519. ScreenReqTags    dc.l    ASLSM_TitleText
  1520. ScreenHailText    dc.l    0
  1521.         dc.l    ASLSM_SleepWindow,-1
  1522.         dc.l    ASLSM_DoOverscanType,-1
  1523.         dc.l    ASLSM_PropertyMask,DIPF_IS_HAM|DIPF_IS_EXTRAHALFBRITE|DIPF_IS_DUALPF
  1524.         dc.l    ASLSM_PropertyFlags,0
  1525.         dc.l    0,0
  1526.  
  1527. DoScreenReqTags    dc.l    ASLSM_InitialDisplayID
  1528. ScreenReqID    dc.l    0
  1529.         dc.l    ASLSM_InitialOverscanType
  1530. ScreenReqOScan    dc.l    0
  1531.         dc.l    ASLSM_Window
  1532. ScreenReqWindow    dc.l    0
  1533.         dc.l    0,0
  1534.  
  1535. DoCyberReqTags    dc.l    CYBRMREQ_Screen
  1536. CyberReqScreen    dc.l    0
  1537.         dc.l    CYBRMREQ_WinTitle
  1538. CyberHailText    dc.l    0
  1539.         dc.l    CYBRMREQ_MinWidth,384
  1540.         dc.l    CYBRMREQ_MinHeight,272
  1541.         dc.l    CYBRMREQ_MaxDepth,8
  1542.         dc.l    0,0
  1543.  
  1544. ; Tags für den Directory-Requester
  1545. DirReqTags    dc.l    ASLFR_TitleText
  1546. DirHailText    dc.l    0
  1547.         dc.l    ASLFR_SleepWindow,-1
  1548.         dc.l    ASLFR_Flags2,FRF_REJECTICONS|FRF_DRAWERSONLY
  1549.         dc.l    0,0
  1550.  
  1551. DoDirReqTags    dc.l    ASLFR_InitialDrawer,DirName
  1552.         dc.l    ASLFR_Window
  1553. DirReqWindow    dc.l    0
  1554.         dc.l    0,0
  1555.  
  1556.  
  1557. **
  1558. ** Icon-Daten
  1559. **
  1560.  
  1561.         SECTION    "CHIPDATA",DATA,CHIP
  1562.  
  1563. PrefsI1Data    dc.w    $0000,$0000,$0000,$0400,$0000,$0000,$0000,$0C00
  1564.         dc.w    $0003,$FFC0,$0000,$0C00,$000C,$0030,$0000,$0C00
  1565.         dc.w    $0010,$7E08,$0000,$0C00,$0020,$8104,$0000,$0C00
  1566.         dc.w    $0020,$4104,$0000,$0C00,$0020,$4104,$0000,$0C00
  1567.         dc.w    $0010,$8204,$0000,$0C00,$000F,$0C08,$0000,$0C00
  1568.         dc.w    $0000,$3010,$0000,$0C00,$0000,$4060,$0000,$0C00
  1569.         dc.w    $0000,$8180,$0000,$0C00,$0001,$0E00,$0000,$0C00
  1570.         dc.w    $0000,$8400,$0000,$0C00,$0000,$7800,$0000,$0C00
  1571.         dc.w    $0000,$8400,$0000,$0C00,$0000,$8400,$0000,$0C00
  1572.         dc.w    $0000,$7800,$0000,$0C00,$0000,$0000,$0000,$0C00
  1573.         dc.w    $0000,$0000,$0000,$0C00,$7FFF,$FFFF,$FFFF,$FC00
  1574.  
  1575.         dc.w    $FFFF,$FFFF,$FFFF,$F800,$D555,$5557,$D555,$5000
  1576.         dc.w    $D554,$001F,$F555,$5000,$D553,$FFCF,$F555,$5000
  1577.         dc.w    $D54F,$81F7,$F555,$5000,$D55F,$54FB,$F555,$5000
  1578.         dc.w    $D55F,$94FB,$FFD5,$5000,$D55F,$94F9,$7FF5,$5000
  1579.         dc.w    $D54F,$55F9,$7FD5,$5000,$D550,$53F5,$7FD5,$5000
  1580.         dc.w    $D555,$4FE5,$5F55,$5000,$D555,$3F95,$60D5,$5000
  1581.         dc.w    $D555,$7E7D,$6055,$5000,$D554,$F1FD,$6035,$5000
  1582.         dc.w    $D555,$79FF,$FFD5,$5000,$D555,$05FF,$F555,$5000
  1583.         dc.w    $D555,$797F,$F555,$5000,$D555,$797F,$F555,$5000
  1584.         dc.w    $D555,$055F,$F555,$5000,$D555,$5557,$D555,$5000
  1585.         dc.w    $D555,$5555,$5555,$5000,$8000,$0000,$0000,$0000
  1586.  
  1587.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
  1588.         dc.w    $0000,$0007,$C000,$0000,$0000,$000F,$E000,$0000
  1589.         dc.w    $0000,$0007,$E000,$0000,$0000,$0003,$E000,$0000
  1590.         dc.w    $0000,$0000,$6000,$0000,$0000,$0000,$1FC0,$0000
  1591.         dc.w    $0000,$0000,$1F80,$0000,$0000,$0000,$1F00,$0000
  1592.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$1F00,$0000
  1593.         dc.w    $0000,$0070,$1F80,$0000,$0000,$00F0,$1FC0,$0000
  1594.         dc.w    $0000,$00FC,$6000,$0000,$0000,$007F,$E000,$0000
  1595.         dc.w    $0000,$003F,$E000,$0000,$0000,$001F,$E000,$0000
  1596.         dc.w    $0000,$0007,$C000,$0000,$0000,$0000,$0000,$0000
  1597.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
  1598.  
  1599.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
  1600.         dc.w    $0000,$0007,$C000,$0000,$0000,$000F,$E000,$0000
  1601.         dc.w    $0000,$0007,$E000,$0000,$0000,$0003,$E000,$0000
  1602.         dc.w    $0000,$0000,$6000,$0000,$0000,$0000,$1FC0,$0000
  1603.         dc.w    $0000,$0000,$1F80,$0000,$0000,$0000,$1F00,$0000
  1604.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$1F00,$0000
  1605.         dc.w    $0000,$0070,$1F80,$0000,$0000,$00F0,$1FC0,$0000
  1606.         dc.w    $0000,$00FC,$6000,$0000,$0000,$007F,$E000,$0000
  1607.         dc.w    $0000,$003F,$E000,$0000,$0000,$001F,$E000,$0000
  1608.         dc.w    $0000,$0007,$C000,$0000,$0000,$0000,$0000,$0000
  1609.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
  1610.  
  1611.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
  1612.         dc.w    $0000,$0007,$C000,$0000,$0000,$000F,$E000,$0000
  1613.         dc.w    $0000,$0007,$E000,$0000,$0000,$0003,$E000,$0000
  1614.         dc.w    $0000,$0000,$6000,$0000,$0000,$0000,$1FC0,$0000
  1615.         dc.w    $0000,$0000,$1F80,$0000,$0000,$0000,$1F00,$0000
  1616.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$1F00,$0000
  1617.         dc.w    $0000,$0070,$1F80,$0000,$0000,$00F0,$1FC0,$0000
  1618.         dc.w    $0000,$00FC,$6000,$0000,$0000,$007F,$E000,$0000
  1619.         dc.w    $0000,$003F,$E000,$0000,$0000,$001F,$E000,$0000
  1620.         dc.w    $0000,$0007,$C000,$0000,$0000,$0000,$0000,$0000
  1621.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
  1622.  
  1623.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
  1624.         dc.w    $0000,$0007,$C000,$0000,$0000,$000F,$E000,$0000
  1625.         dc.w    $0000,$0007,$E000,$0000,$0000,$0003,$E000,$0000
  1626.         dc.w    $0000,$0000,$6000,$0000,$0000,$0000,$1FC0,$0000
  1627.         dc.w    $0000,$0000,$1F80,$0000,$0000,$0000,$1F00,$0000
  1628.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$1F00,$0000
  1629.         dc.w    $0000,$0070,$1F80,$0000,$0000,$00F0,$1FC0,$0000
  1630.         dc.w    $0000,$00FC,$6000,$0000,$0000,$007F,$E000,$0000
  1631.         dc.w    $0000,$003F,$E000,$0000,$0000,$001F,$E000,$0000
  1632.         dc.w    $0000,$0007,$C000,$0000,$0000,$0000,$0000,$0000
  1633.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
  1634.  
  1635.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
  1636.         dc.w    $0000,$0007,$C000,$0000,$0000,$000F,$E000,$0000
  1637.         dc.w    $0000,$0007,$E000,$0000,$0000,$0003,$E000,$0000
  1638.         dc.w    $0000,$0000,$6000,$0000,$0000,$0000,$1FC0,$0000
  1639.         dc.w    $0000,$0000,$1F80,$0000,$0000,$0000,$1F00,$0000
  1640.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$1F00,$0000
  1641.         dc.w    $0000,$0070,$1F80,$0000,$0000,$00F0,$1FC0,$0000
  1642.         dc.w    $0000,$00FC,$6000,$0000,$0000,$007F,$E000,$0000
  1643.         dc.w    $0000,$003F,$E000,$0000,$0000,$001F,$E000,$0000
  1644.         dc.w    $0000,$0007,$C000,$0000,$0000,$0000,$0000,$0000
  1645.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
  1646.  
  1647.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
  1648.         dc.w    $0000,$0007,$C000,$0000,$0000,$000F,$E000,$0000
  1649.         dc.w    $0000,$0007,$E000,$0000,$0000,$0003,$E000,$0000
  1650.         dc.w    $0000,$0000,$6000,$0000,$0000,$0000,$1FC0,$0000
  1651.         dc.w    $0000,$0000,$1F80,$0000,$0000,$0000,$1F00,$0000
  1652.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$1F00,$0000
  1653.         dc.w    $0000,$0070,$1F80,$0000,$0000,$00F0,$1FC0,$0000
  1654.         dc.w    $0000,$00FC,$6000,$0000,$0000,$007F,$E000,$0000
  1655.         dc.w    $0000,$003F,$E000,$0000,$0000,$001F,$E000,$0000
  1656.         dc.w    $0000,$0007,$C000,$0000,$0000,$0000,$0000,$0000
  1657.         dc.w    $0000,$0000,$0000,$0000,$0000,$0000,$0000,$0000
  1658.  
  1659.  
  1660. **
  1661. ** Nicht initialisierte Daten
  1662. **
  1663.  
  1664.         SECTION    "BSS",BSS
  1665. ModeNameBuf    ds.b    nif_SIZEOF    ;Puffer für GetDisplayInfoData
  1666. DirName        ds.b    256        ;Puffer für Directory-Requester
  1667.  
  1668. ; Einstellungen
  1669. ThePrefs
  1670. Pdummy        ds.w    1
  1671. PNormalCycles    ds.w    1
  1672. PBadLineCycles    ds.w    1
  1673. PCIACycles    ds.w    1
  1674. PJoystick1On    ds.w    1
  1675. PJoystick2On    ds.w    1
  1676. PJoystickSwap    ds.w    1
  1677. PDisplayID    ds.l    1
  1678. PScreenType    ds.w    1
  1679. PDir8        ds.b    256
  1680. PDir9        ds.b    256
  1681. PDir10        ds.b    256
  1682. PDir11        ds.b    256
  1683. PDrv8IsIEC    ds.w    1
  1684. PDrv9IsIEC    ds.w    1
  1685. PDrv10IsIEC    ds.w    1
  1686. PDrv11IsIEC    ds.w    1
  1687. PUseSIDCard    ds.w    1
  1688. POtherIEC    ds.w    1
  1689. PKeyboardYZ    ds.w    1
  1690. PCollisions    ds.w    1
  1691. POverscan    ds.w    1
  1692. PMapSlash    ds.w    1
  1693. PFastReset    ds.w    1
  1694. PSkipLatch    ds.w    1
  1695. PrefsLength    = *-ThePrefs
  1696.  
  1697. FastReset    ds.w    1    ;Prefs: Speichertest bei Reset abschalten
  1698.  
  1699.         END
  1700.